From 9417dbd4080c0d383df32bcb13299f05815d862c Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Tue, 27 May 2025 22:01:02 +0800 Subject: [PATCH 1/2] Move punctuation out of code spans, fix bad backticks --- .../core/structuring_content/basic_html_syntax/index.md | 2 +- .../server-side/django/development_environment/index.md | 2 +- .../extensions/server-side/django/models/index.md | 2 +- .../server-side/express_nodejs/skeleton_website/index.md | 2 +- .../en-us/mdn/writing_guidelines/writing_style_guide/index.md | 4 ++-- .../mozilla/add-ons/webextensions/api/cookies/getall/index.md | 4 ++-- .../add-ons/webextensions/api/runtime/getcontexts/index.md | 2 +- .../add-ons/webextensions/internationalization/index.md | 2 +- .../webextensions/work_with_contextual_identities/index.md | 2 +- files/en-us/mozilla/firefox/releases/29/index.md | 2 +- files/en-us/mozilla/firefox/releases/49/index.md | 2 +- .../mozilla/firefox/releases/8/updating_add-ons/index.md | 2 +- files/en-us/web/api/audiocontext/setsinkid/index.md | 2 +- files/en-us/web/api/cssmathinvert/index.md | 2 +- files/en-us/web/api/cssprimitivevalue/setstringvalue/index.md | 2 +- files/en-us/web/api/document/prepend/index.md | 2 +- files/en-us/web/api/element/checkvisibility/index.md | 2 +- files/en-us/web/api/element/computedstylemap/index.md | 2 +- .../web/api/htmlcanvaselement/contextrestored_event/index.md | 4 ++-- files/en-us/web/api/paymentresponse/retry/index.md | 2 +- files/en-us/web/api/performancetiming/index.md | 4 ++-- files/en-us/web/api/performancetiming/loadeventend/index.md | 2 +- files/en-us/web/api/performancetiming/loadeventstart/index.md | 2 +- .../web/api/remoteplayback/cancelwatchavailability/index.md | 2 +- files/en-us/web/api/rtcpeerconnection/addtrack/index.md | 2 +- files/en-us/web/api/speculation_rules_api/index.md | 2 +- .../web/api/storage_access_api/related_website_sets/index.md | 2 +- files/en-us/web/api/textdecoder/encoding/index.md | 2 +- files/en-us/web/api/transitionevent/pseudoelement/index.md | 2 +- .../css/css_display/flow_layout_and_writing_modes/index.md | 2 +- files/en-us/web/css/css_masking/masking/index.md | 2 +- files/en-us/web/css/filter-function/brightness/index.md | 2 +- files/en-us/web/css/transition-behavior/index.md | 2 +- .../guides/navigation_and_resource_timings/index.md | 4 ++-- files/en-us/webassembly/guides/rust_to_wasm/index.md | 2 +- 35 files changed, 40 insertions(+), 40 deletions(-) diff --git a/files/en-us/learn_web_development/core/structuring_content/basic_html_syntax/index.md b/files/en-us/learn_web_development/core/structuring_content/basic_html_syntax/index.md index 7b77c7ad573adf3..8db282413579d06 100644 --- a/files/en-us/learn_web_development/core/structuring_content/basic_html_syntax/index.md +++ b/files/en-us/learn_web_development/core/structuring_content/basic_html_syntax/index.md @@ -72,7 +72,7 @@ The element is the opening tag, followed by content, followed by the closing tag ### Active learning: creating your first HTML element -Edit the line below in the "Editable code" area by wrapping it with the tags `` and `.` To _open the element_, put the opening tag `` at the start of the line. To _close the element_, put the closing tag `` at the end of the line. Doing this should give the line italic text formatting! See your changes update live in the _Output_ area. +Edit the line below in the "Editable code" area by wrapping it with the tags `` and ``. To _open the element_, put the opening tag `` at the start of the line. To _close the element_, put the closing tag `` at the end of the line. Doing this should give the line italic text formatting! See your changes update live in the _Output_ area. If you make a mistake, you can clear your work using the _Reset_ button. If you get really stuck, press the _Show solution_ button to see the answer. diff --git a/files/en-us/learn_web_development/extensions/server-side/django/development_environment/index.md b/files/en-us/learn_web_development/extensions/server-side/django/development_environment/index.md index 3f89fb38660c6ea..c870f46af3e961f 100644 --- a/files/en-us/learn_web_development/extensions/server-side/django/development_environment/index.md +++ b/files/en-us/learn_web_development/extensions/server-side/django/development_environment/index.md @@ -395,7 +395,7 @@ py -3 -m django --version > > In Windows _Python 3_ scripts are launched by prefixing the command with `py -3`, although this can vary depending on your specific installation. > Try omitting the `-3` modifier if you encounter any problems with commands. -> In Linux/macOS, the command is `python3.` +> In Linux/macOS, the command is `python3`. > [!WARNING] > The rest of this **module** uses the _Linux_ command for invoking Python 3 (`python3`). If you're working on _Windows_ replace this prefix with: `py -3` diff --git a/files/en-us/learn_web_development/extensions/server-side/django/models/index.md b/files/en-us/learn_web_development/extensions/server-side/django/models/index.md index 43b09bc6a0b1874..20da01002aa84aa 100644 --- a/files/en-us/learn_web_development/extensions/server-side/django/models/index.md +++ b/files/en-us/learn_web_development/extensions/server-side/django/models/index.md @@ -278,7 +278,7 @@ books_containing_genre = Book.objects.filter(genre__name__icontains='fiction') > [!NOTE] > You can use underscores (`__`) to navigate as many levels of relationships (`ForeignKey`/`ManyToManyField`) as you like. -> For example, a `Book` that had different types, defined using a further "cover" relationship might have a parameter name: `type__cover__name__exact='hard'.` +> For example, a `Book` that had different types, defined using a further "cover" relationship might have a parameter name: `type__cover__name__exact='hard'`. There is a lot more you can do with queries, including backwards searches from related models, chaining filters, returning a smaller set of values, etc. For more information, see [Making queries](https://docs.djangoproject.com/en/5.0/topics/db/queries/) (Django Docs). diff --git a/files/en-us/learn_web_development/extensions/server-side/express_nodejs/skeleton_website/index.md b/files/en-us/learn_web_development/extensions/server-side/express_nodejs/skeleton_website/index.md index e45ac68da301324..a8003871ef5fce3 100644 --- a/files/en-us/learn_web_development/extensions/server-side/express_nodejs/skeleton_website/index.md +++ b/files/en-us/learn_web_development/extensions/server-side/express_nodejs/skeleton_website/index.md @@ -428,7 +428,7 @@ const app = require("../app"); > [!NOTE] > Node.js 14 and later support ES6 `import` statements for importing JavaScript (ECMAScript) modules. -> To use this feature you have to add `"type": "module",` to your Express **package.json** file, all the modules in your application have to use `import` rather than `require()`, and for _relative imports_ you must include the file extension (for more information see the [Node documentation](https://nodejs.org/api/esm.html#introduction)). +> To use this feature you have to add `"type": "module"`, to your Express **package.json** file, all the modules in your application have to use `import` rather than `require()`, and for _relative imports_ you must include the file extension (for more information see the [Node documentation](https://nodejs.org/api/esm.html#introduction)). > While there are benefits to using `import`, this tutorial uses `require()` in order to match [the Express documentation](https://expressjs.com/en/starter/hello-world.html). The remainder of the code in this file sets up a node HTTP server with `app` set to a specific port (defined in an environment variable or 3000 if the variable isn't defined), and starts listening and reporting server errors and connections. For now you don't really need to know anything else about the code (everything in this file is "boilerplate"), but feel free to review it if you're interested. diff --git a/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md b/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md index 1c1c95e99f87165..14af64ed060d022 100644 --- a/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md +++ b/files/en-us/mdn/writing_guidelines/writing_style_guide/index.md @@ -422,7 +422,7 @@ In the repository, we maintain several word lists, located at [`.vscode/dictiona These are our recommendations for using certain technical terms: -- **HTML elements**: Use the term "element" to refer to HTML and XML elements, instead of "tag". In addition, the element should be wrapped in angle brackets "<>" and should be styled using backticks (\`). For example, using \ inside backticks will style it as `` as is expected. +- **HTML elements**: Use the term "element" to refer to HTML and XML elements, instead of "tag". In addition, the element should be wrapped in angle brackets "<>" and should be styled using backticks (`` ` ``). For example, using \ inside backticks will style it as `` as is expected. - **Correct**: the `` element - **Incorrect**: the span tag @@ -632,7 +632,7 @@ To maintain consistency across MDN Web Docs, keep the following guidelines in mi - **Incorrect**: The [`revert-layer`](/en-US/docs/Web/CSS/revert-layer) keyword. - **Correct**: [HTML DOM API](/en-US/docs/Web/API/HTML_DOM_API) - **Incorrect**: The [HTML DOM API](/en-US/docs/Web/API/HTML_DOM_API) -- As shown in the previous examples, add code formatting using backticks (\`) to keywords and literals in the link text, even though the formatting is not used in page and section titles. For example, for the page title "Array() constructor", the link text will be [`Array()` constructor](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Array). +- As shown in the previous examples, add code formatting using backticks (`` ` ``) to keywords and literals in the link text, even though the formatting is not used in page and section titles. For example, for the page title "Array() constructor", the link text will be [`Array()` constructor](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Array). #### Descriptive text diff --git a/files/en-us/mozilla/add-ons/webextensions/api/cookies/getall/index.md b/files/en-us/mozilla/add-ons/webextensions/api/cookies/getall/index.md index ed37263cd626567..2dfd1422376fec7 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/cookies/getall/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/cookies/getall/index.md @@ -42,8 +42,8 @@ let getting = browser.cookies.getAll( - : An `object` defining which [storage partitions](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies#storage_partitioning) to return cookies from: - If omitted, only cookies from unpartitioned storage are returned. - - If included without `topLevelSite', all cookies from partitioned and unpartitioned storage are returned. - - If included with the specified `topLevelSite', cookies from the specified partition storage are returned. + - If included without `topLevelSite`, all cookies from partitioned and unpartitioned storage are returned. + - If included with the specified `topLevelSite`, cookies from the specified partition storage are returned. This object contains: diff --git a/files/en-us/mozilla/add-ons/webextensions/api/runtime/getcontexts/index.md b/files/en-us/mozilla/add-ons/webextensions/api/runtime/getcontexts/index.md index 88085b192e8916b..f6358fa72003b58 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/runtime/getcontexts/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/runtime/getcontexts/index.md @@ -52,7 +52,7 @@ A [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that - `documentId` - : `string`. UUID of the document associated with the context, or undefined if the context is not hosted in a document. - `documentOrigin` - - : string`. The origin of the document associated with the context or undefined if the context is not hosted in a document. + - : `string`. The origin of the document associated with the context or undefined if the context is not hosted in a document. - `documentUrl` - : `string`. The URL of the document associated with the context or undefined if the context is not hosted in a document. - `frameId` diff --git a/files/en-us/mozilla/add-ons/webextensions/internationalization/index.md b/files/en-us/mozilla/add-ons/webextensions/internationalization/index.md index 4053b18569e6e8c..38dcda92a7997fd 100644 --- a/files/en-us/mozilla/add-ons/webextensions/internationalization/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/internationalization/index.md @@ -228,7 +228,7 @@ In addition, you can use such substitutions to specify parts of the string that Locales can be specified using a language code, such as `fr` or `en` or qualified with a script and region code, such as `en-US` or `zh-Hans-CN`. When your extension asks the i18n system for a string, it selects a string using this algorithm: 1. Return the string if there is a `messages.json` file for the user's set browser locale containing the string. For example, if the user has set their browser to `en-US` and the extension provides the `_locales/en_US/messages.json` file. -2. Otherwise, if the browser locale is qualified with a script or region (e.g., `en-US` or `zh-Hans-CN`) and there is a `messages.json` file for the regionless version and failing that the scriptless version of that locale and that file contains the string, return it. For example, if the user has set their browser to `zh-Hans-CN` (and there is no `_locales/zh_Hans_CN/messages.json` file) the i18n system looks for a string in `zh-Hans`, and if that isn't available, `zh.` +2. Otherwise, if the browser locale is qualified with a script or region (e.g., `en-US` or `zh-Hans-CN`) and there is a `messages.json` file for the regionless version and failing that the scriptless version of that locale and that file contains the string, return it. For example, if the user has set their browser to `zh-Hans-CN` (and there is no `_locales/zh_Hans_CN/messages.json` file) the i18n system looks for a string in `zh-Hans`, and if that isn't available, `zh`. 3. Otherwise, if there is a `messages.json` file for the `default_locale` defined in the `manifest.json`, and it contains the string, return it. 4. Otherwise return an empty string. diff --git a/files/en-us/mozilla/add-ons/webextensions/work_with_contextual_identities/index.md b/files/en-us/mozilla/add-ons/webextensions/work_with_contextual_identities/index.md index c8f47bb8b1e60be..12754e06396754f 100644 --- a/files/en-us/mozilla/add-ons/webextensions/work_with_contextual_identities/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/work_with_contextual_identities/index.md @@ -109,7 +109,7 @@ if (browser.contextualIdentities === undefined) { Firefox installs with the contextual identity feature turned off. It's turned on when an extension using the `contextualIdentities` API is installed. However, the user can turn the feature off using an option on the preferences page (about:preferences), hence the need for the check. -The script now uses {{WebExtAPIRef("contextualIdentities.query.")}} to determine whether any contextual identities are defined in the browser. If there are none, a message is added to the popup and the script stops. +The script now uses {{WebExtAPIRef("contextualIdentities.query")}} to determine whether any contextual identities are defined in the browser. If there are none, a message is added to the popup and the script stops. ```js browser.contextualIdentities.query({}).then((identities) => { diff --git a/files/en-us/mozilla/firefox/releases/29/index.md b/files/en-us/mozilla/firefox/releases/29/index.md index 1ea1e4da6b5cfff..6bbf929ed2cee3f 100644 --- a/files/en-us/mozilla/firefox/releases/29/index.md +++ b/files/en-us/mozilla/firefox/releases/29/index.md @@ -81,7 +81,7 @@ _See the [Mozilla Hacks blog post](https://hacks.mozilla.org/2014/02/css-source- - The deprecated `Window.pkcs11` property has been removed; it was returning `null` since Firefox 3.0.14. ([Firefox bug 964964](https://bugzil.la/964964)) - The {{domxref("Node.cloneNode()")}} and {{domxref("Document.importNode()")}} methods take the Boolean `deep` argument. Until now, if omitted, these methods acted as if the value of `deep` was `true`. But this behavior has been changed as per the latest spec, and if omitted, the methods will act as if the value was `false`. ([Firefox bug 937461](https://bugzil.la/937461)) - `Window._content` is no longer available to Web content ([Firefox bug 946564](https://bugzil.la/946564)). -- {{domxref("HTMLAnchorElement/port", "URLUtils.port")}} behavior has been slightly changed: set to `''` will set it to the default port associated with the protocol, and `0` to `0.` ([Firefox bug 930450](https://bugzil.la/930450)) +- {{domxref("HTMLAnchorElement/port", "URLUtils.port")}} behavior has been slightly changed: set to `''` will set it to the default port associated with the protocol, and `0` to `0`. ([Firefox bug 930450](https://bugzil.la/930450)) - {{domxref("Document.referrer")}} is now based on the incumbent script ([Firefox bug 887928](https://bugzil.la/887928)). - The [Gamepad API](/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API) is enabled by default ([Firefox bug 878828](https://bugzil.la/878828)). - The `CanvasRenderingContext2D.drawSystemFocusRing()` method got renamed to {{domxref("CanvasRenderingContext2D.drawFocusIfNeeded()")}} ([Firefox bug 959820](https://bugzil.la/959820)). diff --git a/files/en-us/mozilla/firefox/releases/49/index.md b/files/en-us/mozilla/firefox/releases/49/index.md index de09ec4ca01b647..4ce6f15a588633b 100644 --- a/files/en-us/mozilla/firefox/releases/49/index.md +++ b/files/en-us/mozilla/firefox/releases/49/index.md @@ -89,7 +89,7 @@ page-type: firefox-release-notes - Added the _experimental_ and _non-standard_ {{domxref("HTMLMediaElement.seekToNextFrame()")}} method, which allows seeking frame-by-frame through video content ([Firefox bug 1235301](https://bugzil.la/1235301)). While you're encouraged to experiment with this method to help us understand how useful it is, _do not use it in production code!_ - The {{domxref("HTMLLabelElement.form")}} property now returns the form with which the label's control is associated, if there is a control (and if that control is associated with a form). Previously, labels were directly associated with forms using this property ([Firefox bug 1268852](https://bugzil.la/1268852)). - Support for the third parameter of {{domxref("EventTarget.addEventListener()")}}, either a {{jsxref("Boolean")}} or an `EventListenerOptions` has been added ([Firefox bug 1266164](https://bugzil.la/1266164) and [Firefox bug 1266066](https://bugzil.la/1266066)). -- The audio volume related values for {{domxref("KeyboardEvent.key")}} have been renamed. `"VolumeDown"` is now `"AudioVolumeDown"`, `"VolumeUp"` is now `"AudioVolumeUp"`, and `"VolumeMute"` is now `"AudioVolumeMute".` This brings Firefox into alignment with the latest draft of the UI Events specification ([Firefox bug 1272578](https://bugzil.la/1272578)). See [Code values for keyboard events](/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values) for a full list of available key codes. +- The audio volume related values for {{domxref("KeyboardEvent.key")}} have been renamed. `"VolumeDown"` is now `"AudioVolumeDown"`, `"VolumeUp"` is now `"AudioVolumeUp"`, and `"VolumeMute"` is now `"AudioVolumeMute"`. This brings Firefox into alignment with the latest draft of the UI Events specification ([Firefox bug 1272578](https://bugzil.la/1272578)). See [Code values for keyboard events](/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values) for a full list of available key codes. - The keys previously referred to as `"MozHomeScreen"`, `"MozCameraFocusAdjust"`, and `"MozPhoneCall"` now have official names in the UI Events specification: `"GoHome"`, `"CameraFocus"`, and `"Call"`. Firefox 49 has been updated to use the new names ([Firefox bug 1272599](https://bugzil.la/1272599)). See [Code values for keyboard events](/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values) for a full list of available key codes. - The key values `"Separator"` and `"MediaSkip"` have been removed, as they were deprecated and unused ([Firefox bug 1232919](https://bugzil.la/1232919)). - Key values and the corresponding key codes `"Hyper"` and `"Super"` have been added to represent these legacy modifier keys ([Firefox bug 1232919](https://bugzil.la/1232919)). diff --git a/files/en-us/mozilla/firefox/releases/8/updating_add-ons/index.md b/files/en-us/mozilla/firefox/releases/8/updating_add-ons/index.md index f69d0df2ab8b0c3..bdc39d8393d5206 100644 --- a/files/en-us/mozilla/firefox/releases/8/updating_add-ons/index.md +++ b/files/en-us/mozilla/firefox/releases/8/updating_add-ons/index.md @@ -52,7 +52,7 @@ Similarly, a new global, `ChromeWorker`, was introduced to support allowing Work ## Security changes -Support for SSL 2.0 has been removed. This shouldn't affect any current add-ons. However, for reference, some very old code was removed, as well as support for the preferences `security.enable_ssl2` (which is false by default), and all preferences starting with `security.ssl2.` +Support for SSL 2.0 has been removed. This shouldn't affect any current add-ons. However, for reference, some very old code was removed, as well as support for the preferences `security.enable_ssl2` (which is false by default), and all preferences starting with `security.ssl2`. ## See also diff --git a/files/en-us/web/api/audiocontext/setsinkid/index.md b/files/en-us/web/api/audiocontext/setsinkid/index.md index 1ef933c654b70db..55dc2fc9764d091 100644 --- a/files/en-us/web/api/audiocontext/setsinkid/index.md +++ b/files/en-us/web/api/audiocontext/setsinkid/index.md @@ -93,7 +93,7 @@ mediaDeviceBtn.addEventListener("click", async () => { We also provide the user with a dropdown menu to allow them to change the audio output device on the fly. To do this, we: 1. Provide a button to populate the dropdown menu. We first invoke {{domxref("MediaDevices.getUserMedia()")}} to trigger the permissions prompt we need to allow device enumeration, then use {{domxref("MediaDevices.enumerateDevices()")}} to get all the available devices. We loop through the different devices and make each one available as an option in a {{htmlelement("select")}} element. We also create a "None" option for the case where you don't want to play your audio in any output. -2. Add a {{domxref("HTMLElement/change_event", "change")}} event listener to the {{htmlelement("select")}} element to change the sink ID and therefore the audio output device when a new value is selected. If "None" is selected in the dropdown, we invoke `setSinkId()` with the `{ type : 'none' }` object parameter to select no audio device, otherwise we run it with the audio device ID contained in the `` element `value` attribute as the parameter. The output device can be changed during audio playback, as well as before, or between plays. diff --git a/files/en-us/web/api/cssmathinvert/index.md b/files/en-us/web/api/cssmathinvert/index.md index 2b95b1aecbc1f90..fdd13c1400a263a 100644 --- a/files/en-us/web/api/cssmathinvert/index.md +++ b/files/en-us/web/api/cssmathinvert/index.md @@ -7,7 +7,7 @@ browser-compat: api.CSSMathInvert {{APIRef("CSS Typed Object Model API")}} -The **`CSSMathInvert`** interface of the [CSS Typed Object Model API](/en-US/docs/Web/API/CSS_Object_Model) represents a CSS {{CSSXref('calc','calc()')}} used as `calc(1 / ).` It inherits properties and methods from its parent {{domxref('CSSNumericValue')}}. +The **`CSSMathInvert`** interface of the [CSS Typed Object Model API](/en-US/docs/Web/API/CSS_Object_Model) represents a CSS {{CSSXref('calc','calc()')}} used as `calc(1 / )`. It inherits properties and methods from its parent {{domxref('CSSNumericValue')}}. {{InheritanceDiagram}} diff --git a/files/en-us/web/api/cssprimitivevalue/setstringvalue/index.md b/files/en-us/web/api/cssprimitivevalue/setstringvalue/index.md index 2a2c0e270494ba2..b9440005bf41f3f 100644 --- a/files/en-us/web/api/cssprimitivevalue/setstringvalue/index.md +++ b/files/en-us/web/api/cssprimitivevalue/setstringvalue/index.md @@ -56,7 +56,7 @@ None ({{jsxref("undefined")}}). - `InvalidAccessError` {{domxref("DOMException")}} - : Thrown if the CSS value doesn't contain a string value or if the string value can't be converted into the specified unit. -- `NoModificationAllowedError' {{domxref("DOMException")}} +- `NoModificationAllowedError` {{domxref("DOMException")}} - : Thrown if the property is read-only. ## Specifications diff --git a/files/en-us/web/api/document/prepend/index.md b/files/en-us/web/api/document/prepend/index.md index eeb034445143601..79ab4ec143dea8c 100644 --- a/files/en-us/web/api/document/prepend/index.md +++ b/files/en-us/web/api/document/prepend/index.md @@ -42,7 +42,7 @@ None ({{jsxref("undefined")}}). ### Prepending a root element to a document If you try to prepend an element to an existing HTML document, -it might throw a `HierarchyRequestError' {{domxref("DOMException")}} given a {{HTMLElement("html")}} element already exists. +it might throw a `HierarchyRequestError` {{domxref("DOMException")}} given a {{HTMLElement("html")}} element already exists. ```js let html = document.createElement("html"); diff --git a/files/en-us/web/api/element/checkvisibility/index.md b/files/en-us/web/api/element/checkvisibility/index.md index 89b3484c27c4282..c5c9fea32080acd 100644 --- a/files/en-us/web/api/element/checkvisibility/index.md +++ b/files/en-us/web/api/element/checkvisibility/index.md @@ -173,7 +173,7 @@ function updateCSS() { The results are shown below. If you change the selection the results will be applied to the test element (blue outline) and the results of the `checkVisibility()` for each setting should be displayed. So for example, if you set the `opacity: 0` that test (only) should indicate `false`. -However if you set `display: none` then all tests should return `false. +However if you set `display: none` then all tests should return `false`. {{ EmbedLiveSample('Test checkVisibility() with varied CSS', "100%", "200" ) }} diff --git a/files/en-us/web/api/element/computedstylemap/index.md b/files/en-us/web/api/element/computedstylemap/index.md index 2677155d7596a7e..8f2d734cb384f50 100644 --- a/files/en-us/web/api/element/computedstylemap/index.md +++ b/files/en-us/web/api/element/computedstylemap/index.md @@ -53,7 +53,7 @@ a { ``` We add JavaScript to grab our link and return back a definition list of all the CSS -property values using `computedStyleMap().` +property values using `computedStyleMap()`. ```js // get the element diff --git a/files/en-us/web/api/htmlcanvaselement/contextrestored_event/index.md b/files/en-us/web/api/htmlcanvaselement/contextrestored_event/index.md index a853cda877aa138..44d57e1011c54ed 100644 --- a/files/en-us/web/api/htmlcanvaselement/contextrestored_event/index.md +++ b/files/en-us/web/api/htmlcanvaselement/contextrestored_event/index.md @@ -53,6 +53,6 @@ canvas.addEventListener( ## See also -- [`HTMLCanvasElement: contextlost` event](/en-US/docs/Web/API/HTMLCanvasElement/contextlost_event) +- [`HTMLCanvasElement`: `contextlost` event](/en-US/docs/Web/API/HTMLCanvasElement/contextlost_event) - [`CanvasRenderingContext2D.isContextLost()`](/en-US/docs/Web/API/CanvasRenderingContext2D/isContextLost) -- [OffscreenCanvas: contextlost` event](/en-US/docs/Web/API/OffscreenCanvas/contextlost_event) +- [`OffscreenCanvas`: `contextlost` event](/en-US/docs/Web/API/OffscreenCanvas/contextlost_event) diff --git a/files/en-us/web/api/paymentresponse/retry/index.md b/files/en-us/web/api/paymentresponse/retry/index.md index 86adcf9d67aac3a..487668770238c61 100644 --- a/files/en-us/web/api/paymentresponse/retry/index.md +++ b/files/en-us/web/api/paymentresponse/retry/index.md @@ -29,7 +29,7 @@ retry(errorFields) - : An object, with the following properties: - `error` {{optional_inline}} - : A general description of a payment error from which the user may attempt to recover by retrying the payment, possibly after correcting mistakes in the payment information. `error` can be provided all by itself to provide only a generic error message, or in concert with the other properties to serve as an overview while other properties' values guide the user to errors in specific fields in the payment form. - - `paymentMethod {{optional_inline}} + - `paymentMethod` {{optional_inline}} - : Any payment-method-specific errors which may have occurred. This object's contents will vary depending on the payment method used. ### Return value diff --git a/files/en-us/web/api/performancetiming/index.md b/files/en-us/web/api/performancetiming/index.md index da9a1f95b477ad9..6a804e8adc57901 100644 --- a/files/en-us/web/api/performancetiming/index.md +++ b/files/en-us/web/api/performancetiming/index.md @@ -63,9 +63,9 @@ These properties are listed in the order in which they occur during the navigati - {{domxref("PerformanceTiming.domComplete")}} {{ReadOnlyInline}} {{Deprecated_Inline}} - : When the parser finished its work on the main document, that is when its {{domxref("Document.readyState")}} changes to `'complete'` and the corresponding {{domxref("Document/readystatechange_event", "readystatechange")}} event is thrown. - {{domxref("PerformanceTiming.loadEventStart")}} {{ReadOnlyInline}} {{Deprecated_Inline}} - - : When the {{domxref("Window/load_event", "load")}} event was sent for the current document. If this event has not yet been sent, it returns `0.` + - : When the {{domxref("Window/load_event", "load")}} event was sent for the current document. If this event has not yet been sent, it returns `0`. - {{domxref("PerformanceTiming.loadEventEnd")}} {{ReadOnlyInline}} {{Deprecated_Inline}} - - : When the {{domxref("Window/load_event", "load")}} event handler terminated, that is when the load event is completed. If this event has not yet been sent, or is not yet completed, it returns `0.` + - : When the {{domxref("Window/load_event", "load")}} event handler terminated, that is when the load event is completed. If this event has not yet been sent, or is not yet completed, it returns `0`. ## Instance methods diff --git a/files/en-us/web/api/performancetiming/loadeventend/index.md b/files/en-us/web/api/performancetiming/loadeventend/index.md index e9d5a22d1d9609a..3898eeba8e3d87a 100644 --- a/files/en-us/web/api/performancetiming/loadeventend/index.md +++ b/files/en-us/web/api/performancetiming/loadeventend/index.md @@ -19,7 +19,7 @@ The legacy read-only property returns an `unsigned long long` representing the moment, in milliseconds since the UNIX epoch, when the {{domxref("Window/load_event", "load")}} event handler terminated, that is when the load event is completed. If this event has not yet been -sent, or is not yet completed, it returns `0.` +sent, or is not yet completed, it returns `0`. ## Value diff --git a/files/en-us/web/api/performancetiming/loadeventstart/index.md b/files/en-us/web/api/performancetiming/loadeventstart/index.md index 1b4462210e26efd..87d9259f3c29ec5 100644 --- a/files/en-us/web/api/performancetiming/loadeventstart/index.md +++ b/files/en-us/web/api/performancetiming/loadeventstart/index.md @@ -18,7 +18,7 @@ The legacy **`PerformanceTiming.loadEventStart`** read-only property returns an `unsigned long long` representing the moment, in milliseconds since the UNIX epoch, when the {{domxref("Window/load_event", "load")}} event was sent for the -current document. If this event has not yet been sent, it returns `0.` +current document. If this event has not yet been sent, it returns `0`. ## Value diff --git a/files/en-us/web/api/remoteplayback/cancelwatchavailability/index.md b/files/en-us/web/api/remoteplayback/cancelwatchavailability/index.md index 9586ec9d810ec5d..001e6b690a8e0a1 100644 --- a/files/en-us/web/api/remoteplayback/cancelwatchavailability/index.md +++ b/files/en-us/web/api/remoteplayback/cancelwatchavailability/index.md @@ -38,7 +38,7 @@ A {{jsxref("Promise")}} that resolves with `undefined`. ## Examples -Once a remote playback device has been identified and is connected, the monitoring of available devices can be stopped using `cancelWatchAvailability().` +Once a remote playback device has been identified and is connected, the monitoring of available devices can be stopped using `cancelWatchAvailability()`. ```js function switchToRemoteUI() { diff --git a/files/en-us/web/api/rtcpeerconnection/addtrack/index.md b/files/en-us/web/api/rtcpeerconnection/addtrack/index.md index db573e8449db335..f33b2c1ecae5c6a 100644 --- a/files/en-us/web/api/rtcpeerconnection/addtrack/index.md +++ b/files/en-us/web/api/rtcpeerconnection/addtrack/index.md @@ -157,7 +157,7 @@ An `RTCRtpSender` instance is only compatible for reuse if it meets the followin If all of those criteria are met, the sender gets reused, which results in these changes occurring to the existing `RTCRtpSender` and its `RTCRtpTransceiver`: - The `RTCRtpSender`'s {{domxref("RTCRtpSender.track", "track")}} is set to the specified track. -- The sender's set of associated streams is set to the list of streams passed into this method, `stream...`. +- The sender's set of associated streams is set to the list of streams passed into this method, `stream1`, …, `streamN`. - The associated {{domxref("RTCRtpTransceiver")}} has its `currentDirection` updated to indicate that it is sending; if its current value is `"recvonly"`, it becomes `"sendrecv"`, and if its current value is `"inactive"`, it becomes `"sendonly"`. diff --git a/files/en-us/web/api/speculation_rules_api/index.md b/files/en-us/web/api/speculation_rules_api/index.md index 8daa4a03dda140d..1a1072337e18bfa 100644 --- a/files/en-us/web/api/speculation_rules_api/index.md +++ b/files/en-us/web/api/speculation_rules_api/index.md @@ -381,7 +381,7 @@ APIs that require the containing document to be focused: APIs that require the containing document's {{domxref("Document.visibilityState")}} to be `"visible"`: -- [Picture-in-Picture API](/en-US/docs/Web/API/Picture-in-Picture_API): {{domxref("HTMLVideoElement.requestPictureInPicture()")}} (requires the containing document's visibility state to be `"visible", _or_ {{glossary("transient activation")}}) +- [Picture-in-Picture API](/en-US/docs/Web/API/Picture-in-Picture_API): {{domxref("HTMLVideoElement.requestPictureInPicture()")}} (requires the containing document's visibility state to be `"visible"`, _or_ {{glossary("transient activation")}}) - [Screen Wake Lock API](/en-US/docs/Web/API/Screen_Wake_Lock_API): {{domxref("WakeLock.request()")}} ### Other restricted features diff --git a/files/en-us/web/api/storage_access_api/related_website_sets/index.md b/files/en-us/web/api/storage_access_api/related_website_sets/index.md index ceb199fc7c49c06..8fe2c769591a7af 100644 --- a/files/en-us/web/api/storage_access_api/related_website_sets/index.md +++ b/files/en-us/web/api/storage_access_api/related_website_sets/index.md @@ -135,7 +135,7 @@ Once a set is active: RWS has been designed with security in mind. It would be disastrous if a bad actor site were able to claim to be part of a set and gain the privileges that entails. Lets consider a theoretical bad actor site, `evilsite.example.com`, and look at some examples of attacks it could try to make, all of which would fail: -- **`evilsite.example.com` claims to be an associated site in another set**: If a site claiming to be in a set (`i.e.` by listing a primary in a `.well-known` file) is not included in the set submission and/or primary's `.well-known` file, it won't get the benefits of being in the set. +- **`evilsite.example.com` claims to be an associated site in another set**: If a site claiming to be in a set (i.e., by listing a primary in a `.well-known` file) is not included in the set submission and/or primary's `.well-known` file, it won't get the benefits of being in the set. - **`evilsite.example.com` claims to be a primary site, and submits a set that includes some would-be victim sites**: The submission process requires that `.well-known` files hosted by non-primary sites explicitly list out their primary. If this primary doesn't match the set submission (i.e., if the associated/service sites expect to have a different primary, or don't expect to be in a set at all), the submission will be rejected. - **`site1.example.com` and `site2.example.com` are intentionally in the same set, but `site1.example.com` gets hijacked by `evilsite.example.com`**: The impact of a site hijacking attack within a set isn't any worse than it would usually be, once the other sites are updated accordingly: - The regular [Storage Access API](/en-US/docs/Web/API/Storage_Access_API) requires an active opt-in by the embedded site, so `site2.example.com` can stop calling `document.requestStorageAccess()` when it's embedded in `site1.example.com`, avoiding a {{glossary("CSRF")}} attack. diff --git a/files/en-us/web/api/textdecoder/encoding/index.md b/files/en-us/web/api/textdecoder/encoding/index.md index 172d4a0cc3102de..e86fa089aac923b 100644 --- a/files/en-us/web/api/textdecoder/encoding/index.md +++ b/files/en-us/web/api/textdecoder/encoding/index.md @@ -25,7 +25,7 @@ A lower-cased ASCII string, which can be one of the following values: ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5), ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6), ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7), - ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`, + ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8), ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I), ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10), ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13), diff --git a/files/en-us/web/api/transitionevent/pseudoelement/index.md b/files/en-us/web/api/transitionevent/pseudoelement/index.md index 847ac86b8a9de7a..1a57474179b98fd 100644 --- a/files/en-us/web/api/transitionevent/pseudoelement/index.md +++ b/files/en-us/web/api/transitionevent/pseudoelement/index.md @@ -11,7 +11,7 @@ browser-compat: api.TransitionEvent.pseudoElement The **`TransitionEvent.pseudoElement`** read-only property is a string, starting with `'::'`, containing the name of the [pseudo-element](/en-US/docs/Web/CSS/Pseudo-elements) the animation runs on. If the transition doesn't run on a pseudo-element but on the element, an empty string: -`''``.` +`""`. ## Value diff --git a/files/en-us/web/css/css_display/flow_layout_and_writing_modes/index.md b/files/en-us/web/css/css_display/flow_layout_and_writing_modes/index.md index eafacffd0e88498..c788e8483e0a826 100644 --- a/files/en-us/web/css/css_display/flow_layout_and_writing_modes/index.md +++ b/files/en-us/web/css/css_display/flow_layout_and_writing_modes/index.md @@ -50,7 +50,7 @@ h1 { ## Block flow direction -The {{cssxref("writing-mode")}} property accepts the values `horizontal-tb`, `vertical-rl` and `vertical-lr`. These values control the direction that blocks flow on the page. The initial value is `horizontal-tb,` which is a top to bottom block flow direction with a horizontal inline direction. Left to right languages, such as English, and Right to left languages, such as Arabic, are all `horizontal-tb`. +The {{cssxref("writing-mode")}} property accepts the values `horizontal-tb`, `vertical-rl` and `vertical-lr`. These values control the direction that blocks flow on the page. The initial value is `horizontal-tb`, which is a top to bottom block flow direction with a horizontal inline direction. Left to right languages, such as English, and Right to left languages, such as Arabic, are all `horizontal-tb`. The following example shows blocks using the initial `horizontal-tb` value explicitly: diff --git a/files/en-us/web/css/css_masking/masking/index.md b/files/en-us/web/css/css_masking/masking/index.md index e0f899fb7ac39ce..a7d16d93d7087dd 100644 --- a/files/en-us/web/css/css_masking/masking/index.md +++ b/files/en-us/web/css/css_masking/masking/index.md @@ -123,7 +123,7 @@ Note how the transparent mask areas crop the element; the only parts of the elem ## Alpha transparency versus luminance -The `mask-mode` property's default value — `match-source` — sets the mode to either `alpha` or `luminance`, depending on the value. The `match-source` value resolves to `alpha` for all mask sources other than SVG {{svgelement("mask")}} elements. If the mask source is a `` element, `match-source` resolves to the ``'s {{cssxref("mask-type")}} property value, if set. Otherwise, it resolves to the value of the SVG {{svgattr("mask-type")}} attribute set on the `` element. If that is not explicitly set either, `match-source` will resolve to `luminance.` +The `mask-mode` property's default value — `match-source` — sets the mode to either `alpha` or `luminance`, depending on the value. The `match-source` value resolves to `alpha` for all mask sources other than SVG {{svgelement("mask")}} elements. If the mask source is a `` element, `match-source` resolves to the ``'s {{cssxref("mask-type")}} property value, if set. Otherwise, it resolves to the value of the SVG {{svgattr("mask-type")}} attribute set on the `` element. If that is not explicitly set either, `match-source` will resolve to `luminance`. If `mask-mode` resolves to `luminance`, or we explicitly set it to `luminance`, the colors of the mask will affect the mask opacity. In the previous demo, the `mask-mode` was not set, so the value defaulted to `match-source`. As the colorful heart image is a transparent PNG, `match-source` resolves to `alpha`. By explicitly setting this property, we can control the mode. In this demo, we change the `mask-mode` to `luminance`. diff --git a/files/en-us/web/css/filter-function/brightness/index.md b/files/en-us/web/css/filter-function/brightness/index.md index de85812737bdb80..35a24b0304891e3 100644 --- a/files/en-us/web/css/filter-function/brightness/index.md +++ b/files/en-us/web/css/filter-function/brightness/index.md @@ -112,7 +112,7 @@ p { {{EmbedLiveSample('Applying_brightness_using_the_backdrop_filter_property', '100%', '280')}} -In this example, the colors in the area behind the `

` element shift linearly. If the `backdrop-filter` property was set to `brightness(0%)`, the `

` area with the `

` element would have been black and hidden the image behind. At `brightness(100%)`, the `

` area color would be the same as the input `#d4d5b2`, and the image behind would be completely transparent. With the brightness set to `150%` as in this example, the colors in the image behind are getting hidden by the brightness of the `
` element.` +In this example, the colors in the area behind the `

` element shift linearly. If the `backdrop-filter` property was set to `brightness(0%)`, the `

` area with the `

` element would have been black and hidden the image behind. At `brightness(100%)`, the `

` area color would be the same as the input `#d4d5b2`, and the image behind would be completely transparent. With the brightness set to `150%` as in this example, the colors in the image behind are getting hidden by the brightness of the `
` element. ### Applying brightness using the filter property diff --git a/files/en-us/web/css/transition-behavior/index.md b/files/en-us/web/css/transition-behavior/index.md index 19d664a793ee8c7..cc7235d14222443 100644 --- a/files/en-us/web/css/transition-behavior/index.md +++ b/files/en-us/web/css/transition-behavior/index.md @@ -62,7 +62,7 @@ The `transition-behavior` value can be included as part of a shorthand {{cssxref } ``` -In the above snippet we include the `transition` property twice. The first instance does not include the `allow-discrete` value — this provides cross-browser support, ensuring the card's other properties still transition in browsers that don't support `transition-behavior.` +In the above snippet we include the `transition` property twice. The first instance does not include the `allow-discrete` value — this provides cross-browser support, ensuring the card's other properties still transition in browsers that don't support `transition-behavior`. ### Discrete animation behavior diff --git a/files/en-us/web/performance/guides/navigation_and_resource_timings/index.md b/files/en-us/web/performance/guides/navigation_and_resource_timings/index.md index 82da3fec3670cb1..8122660dd112bba 100644 --- a/files/en-us/web/performance/guides/navigation_and_resource_timings/index.md +++ b/files/en-us/web/performance/guides/navigation_and_resource_timings/index.md @@ -272,7 +272,7 @@ The order is: When the load event was sent for the current document. If this event has not yet been - sent, it returns 0. + sent, it returns 0. @@ -284,7 +284,7 @@ The order is: load event handler terminated, that is when the load event is completed. If this event has not yet been sent, or is not yet completed, it returns - 0. + 0. diff --git a/files/en-us/webassembly/guides/rust_to_wasm/index.md b/files/en-us/webassembly/guides/rust_to_wasm/index.md index e8fa2550abdfcd6..e564c31ab4edfb5 100644 --- a/files/en-us/webassembly/guides/rust_to_wasm/index.md +++ b/files/en-us/webassembly/guides/rust_to_wasm/index.md @@ -148,7 +148,7 @@ Once again, we see the `#[wasm_bindgen]` attribute. In this case, it's not modif This function is named `greet`, and takes one argument, a string (written `&str`), `name`. It then calls the `alert` function we asked for in the `extern` block above. It passes a call to the `format!` macro, which lets us concatenate strings. -The `format!` macro takes two arguments in this case: a format string, and a variable to put in it. The format string is the `"Hello, {}!"` bit. It contains `{}`s, where variables will be interpolated. The variable we're passing is `name`, the argument to the function, so if we call `greet("Steve")` we should see `"Hello, Steve!".` +The `format!` macro takes two arguments in this case: a format string, and a variable to put in it. The format string is the `"Hello, {}!"` bit. It contains `{}`s, where variables will be interpolated. The variable we're passing is `name`, the argument to the function, so if we call `greet("Steve")` we should see `"Hello, Steve!"`. This is passed to `alert()`, so when we call this function we will see an alert box with "Hello, Steve!" in it. From ad16bd55fbd1bae5dc105d91a0f639cbbce21456 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Tue, 27 May 2025 22:16:25 +0800 Subject: [PATCH 2/2] Update index.md --- .../server-side/express_nodejs/skeleton_website/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/learn_web_development/extensions/server-side/express_nodejs/skeleton_website/index.md b/files/en-us/learn_web_development/extensions/server-side/express_nodejs/skeleton_website/index.md index a8003871ef5fce3..38f353542a7d5e5 100644 --- a/files/en-us/learn_web_development/extensions/server-side/express_nodejs/skeleton_website/index.md +++ b/files/en-us/learn_web_development/extensions/server-side/express_nodejs/skeleton_website/index.md @@ -428,7 +428,7 @@ const app = require("../app"); > [!NOTE] > Node.js 14 and later support ES6 `import` statements for importing JavaScript (ECMAScript) modules. -> To use this feature you have to add `"type": "module"`, to your Express **package.json** file, all the modules in your application have to use `import` rather than `require()`, and for _relative imports_ you must include the file extension (for more information see the [Node documentation](https://nodejs.org/api/esm.html#introduction)). +> To use this feature you have to add `"type": "module"` to your Express **package.json** file, all the modules in your application have to use `import` rather than `require()`, and for _relative imports_ you must include the file extension (for more information see the [Node documentation](https://nodejs.org/api/esm.html#introduction)). > While there are benefits to using `import`, this tutorial uses `require()` in order to match [the Express documentation](https://expressjs.com/en/starter/hello-world.html). The remainder of the code in this file sets up a node HTTP server with `app` set to a specific port (defined in an environment variable or 3000 if the variable isn't defined), and starts listening and reporting server errors and connections. For now you don't really need to know anything else about the code (everything in this file is "boilerplate"), but feel free to review it if you're interested.